package com.lixiang.userinfo.entity;

import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.annotation.JsonFormat;
/**
 * 客户信息对象
 * @author 李湘
 * @date 2018-10-19
 */
public class User {
    private Integer userId;//客户编号

    private String userName;//客户姓名

    private String userPhone;//客户电话

    private Integer userSex;//客户性别 1男 2女

    private Integer userLogcount;//客户访问次数

    //设置日期转换格式
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date userLastlogtime;//客户上一次访问时间

    private Integer saleId;//销售编号
    
    private Integer userState;//状态 1使用中 2禁用中
    
    public User() {
		super();
	}
    
	public User(Integer userId) {
		super();
		this.userId = userId;
	}

	public User(Integer userId, String userName, String userPhone, Integer userSex, Integer userLogcount,
			Date userLastlogtime, Integer saleId, Integer userState) {
		super();
		this.userId = userId;
		this.userName = userName;
		this.userPhone = userPhone;
		this.userSex = userSex;
		this.userLogcount = userLogcount;
		this.userLastlogtime = userLastlogtime;
		this.saleId = saleId;
		this.userState = userState;
	}

	public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName == null ? null : userName.trim();
    }

    public String getUserPhone() {
        return userPhone;
    }

    public void setUserPhone(String userPhone) {
        this.userPhone = userPhone == null ? null : userPhone.trim();
    }

    public Integer getUserSex() {
        return userSex;
    }

    public void setUserSex(Integer userSex) {
        this.userSex = userSex;
    }

    public Integer getUserLogcount() {
        return userLogcount;
    }

    public void setUserLogcount(Integer userLogcount) {
        this.userLogcount = userLogcount;
    }
    //设置日期格式转换
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    public Date getUserLastlogtime() {
        return userLastlogtime;
    }

    public void setUserLastlogtime(Date userLastlogtime) {
        this.userLastlogtime = userLastlogtime;
    }

    public Integer getSaleId() {
        return saleId;
    }

    public void setSaleId(Integer saleId) {
        this.saleId = saleId;
    }

    public Integer getUserState() {
        return userState;
    }

    public void setUserState(Integer userState) {
        this.userState = userState;
    }

	@Override
	public String toString() {
		return "User [userId=" + userId + ", userName=" + userName
				+ ", userPhone=" + userPhone + ", userSex=" + userSex
				+ ", userLogcount=" + userLogcount + ", userLastlogtime="
				+ userLastlogtime + ", saleId=" + saleId + ", userState="
				+ userState + "]";
	}
    
    
}